/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package weka.attributeSelection.semiAS.semiClusterAS;

import weka.core.Instances;

/**
 *
 * @author Administrator
 */
public class LabeledDistEvalM implements Distance{

    private Instances m_labeledInstances;
    private Instances[] m_data;
    private LabeledDistEval m_labeledDistEval;

    public LabeledDistEvalM(LabeledDistMethod option,Instances data,Instances[] classData){
        m_labeledInstances=data;
        m_data=classData;
        switch (option) {
                case Partial:
                    m_labeledDistEval = new PartialLabledDistEval(m_labeledInstances);
                    break;
                case Repartial:
                    m_labeledDistEval = new RepartialLabledDistEval(m_labeledInstances);
                    break;
                case ReliefF:
                    m_labeledDistEval = new ReliefFLabledDistEval(m_labeledInstances,m_data);
                    break;
                default:
                    m_labeledDistEval = new ReliefFLabledDistEval(m_labeledInstances,m_data);
                    break;
            }
    }

    public double getDistance(int i, int j) {
        return m_labeledDistEval.getDistance(i, j);
    }
}
